package com.algo.pattern.composite;

public abstract class AbstractNode {

    protected void addChild(AbstractNode childNode) throws Exception {
        throw new Exception("current node unsupport addChild operation");
    }

    protected void removeChild(AbstractNode childNode) throws Exception {
        throw new Exception("current node unsupport removeChild operation");
    }

    abstract void println();

}
